package com.shxy.api.controller.ui;

import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 添加新闻实体
 */
@Data
public class NewsAdd {
    @NotBlank(message = "新闻标题不能为空")
    private String title;
    @NotBlank(message = "新闻内容不能为空")
    private String content;
    @NotBlank(message = "新闻栏目不能为空")
    private String catalogId;
    @NotBlank(message = "作者不能为空")
    private String authorId;

    public String toString() {
        return String.format("%s,%s,%s,%s", title, content, catalogId, authorId);
    }
}
